﻿<%@ Page PathInChannel="{ID}{Page}{Ext}" Object="Article" %>
<%@ OutputCache Duration="86400" VaryByParam="none" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<ali:Get ID="Article" Object="Article" PageID="Request.QueryString['ID']" ForMeta="true" />
<ali:Get ID="ArticlePage" Source="Manager.ParseContent(Article[Content], this)" />
<ali:Get ID="Config" Object="InstanceConfig" Operation="GetBasicSettings()" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<%=MetaKeywords%>" />
<meta name="description" content="<%=MetaDescription%>" />
<title><%=Article[Title]%> - <%=Article[CategoryName]%> - <%=Channel[Name]%> - <%=Site[Name]%></title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ali:Comment><link rel="stylesheet" type="text/css" href="S01/CHS/css/menubar.css" /></ali:Comment>
<link rel="stylesheet" type="text/css" href="<%=CssPath%>menubar.css" />
<ali:Comment><link rel="stylesheet" type="text/css" href="S01/CHS/css/common.css" /></ali:Comment>
<link rel="stylesheet" type="text/css" href="<%=CssPath%>common.css" />
<script language="c#" runat="server">
protected string Condition()
{
	StringBuilder result = new StringBuilder();
	result.Append(Alias.Article.IsDeleted + "=false");
	result.Append(" and " + Alias.Article.IsChecked + "=true");
	result.Append(" and " + Alias.Article.InnerID + "<>" + Article[Alias.Article.InnerID] + " and ");
	
	string[] ids = Article[Alias.Article.TagPageIDs].ToString().Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
	if (ids.Length > 0)
	{
		result.Append("(");
		for (int i = 0; i < ids.Length; i++)
		{
			if (i > 0)
				result.Append(" or ");
			result.Append(Alias.Article.TagPageIDs + " LIKE '%|" + ids[i] + "|%'");
		}
		result.Append(")");
	}
	else
	{
		result.Append(Alias.Article.CategoryID + "=" + Article[Alias.Article.CategoryID]);
	}
	return result.ToString();
}
</script>
<script type="text/javascript">
var _page = "article";
var _webPath = "<%=WebPath%>";
var _lang = "<%=PageLang%>";
var _id = "<%=Article[InnerID]%>";
var _guid = "<%=Article[ID]%>";
var _commentPage = "<%=BuildUrl("ajax_article_comment")%>";
var _checkComment = <%=Config[CheckComment]%>;
var _lang_name = "名称不能为空！";
var _lang_password = "密码不能为空！";
var _lang_content = "内容不能为空！";
var _lang_cant_login = "会员名或密码有误！";
var _lang_cant_post_comment = "发表评论失败！";
var _lang_post_comment_success = "发表评论成功！";
</script>
</head>
<body>
<!-- TemplateBeginEditable name="菜单" -->
<div class="Wrap">
	<ali:Menu Condition="IsDisplay=true and CategoryID IS NULL and ParentID IS NULL">
		<div class="Menu">
			<ali:Record>
				<ali:Select>
					<ali:Yes>
						<a href="<%=URL%>" target="<%=Target%>" title="<%=Name%>"<%=Style%>><strong><%=Name%></strong></a>
					</ali:Yes>
					<ali:No>
						<a href="<%=URL%>" target="<%=Target%>" title="<%=Name%>"<%=Style%>><%=Name%></a>
					</ali:No>
				</ali:Select>
				<ali:Separator>|</ali:Separator>
			</ali:Record>
		</div>
	</ali:Menu>
</div>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="广告位：文章 - Banner" -->
<div class="Wrap">
	<div class="Ad1">
		<ali:Ad Guid="{09F08247-0C8C-4016-9C9F-5C485D0BB7E2}">
			<a href="http://www.alibaza.com" target="_blank"><img src="<%=ImagePath%>ad/ad1.jpg" alt="Ad" style="width:980px;height:100px" /></a>
		</ali:Ad>
	</div>
</div>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="文章类别" -->
<ali:List Object="ArticleCategory" Condition="IsDisplay=true and ParentID IS NULL">
	<div class="SubMenu">
		<div class="Left"></div>
		<div class="Middle">
			<ul id="MenuBar">
				<ali:Record>
					<li>
						<a href="<%=BuildUrl()%>"<%=Style%>><%=Name%></a>
						<ali:List Object="ArticleCategory" Condition="IsDisplay=true and ParentID=ID">
							<ul>
								<ali:Record>
									<li><a href="<%=BuildUrl()%>"<%=Style%>><%=Name%></a></li>
								</ali:Record>
							</ul>
						</ali:List>
					</li>
				</ali:Record>
			</ul>
		</div>
		<div class="Right"></div>
		<br clear="all" />
	</div>
</ali:List>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="搜索" -->
<div class="Wrap">
	<form id="Search" action="<%=BuildUrl("search")%>" target="_blank">
		请输入关键词：
		<input type="text" name="q" size="40" class="Text <%=PageLang%>Font" />
		<input type="submit" value="搜 索" class="Submit" />
	</form>
</div>
<!-- TemplateEndEditable -->

<div class="Wrap">
	<!-- TemplateBeginEditable name="广告位：文章 - 搜索下方 - 左" -->
	<div class="Ad2">
		<ali:Ad Guid="{17B2126F-3AF5-4b27-A92D-2789D3045F84}">
			<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad4.gif" alt="Ad" style="width:250px;height:60px" /></a>
		</ali:Ad>
	</div>
	<!-- TemplateEndEditable -->
	<!-- TemplateBeginEditable name="广告位：文章 - 搜索下方 - 中" -->
	<div class="Ad2">
		<ali:Ad Guid="{21F87B51-A7EB-4ecc-B2C1-3AE5C98A3CDF}">
			<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad7.gif" alt="Ad" style="width:480px;height:60px" /></a>
		</ali:Ad>
	</div>
	<!-- TemplateEndEditable -->
	<!-- TemplateBeginEditable name="广告位：文章 - 搜索下方 - 右" -->
	<div class="Ad2">
		<ali:Ad Guid="{2C248EFF-446E-4180-8280-373F088DC289}">
			<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad8.gif" alt="Ad" style="width:250px;height:60px" /></a>
		</ali:Ad>
	</div>
	<!-- TemplateEndEditable -->
</div>

<!-- TemplateBeginEditable name="路径" -->
<div class="Wrap">
	<div class="Path">当前位置：
		<ali:Path Object="ArticleCategory" Guid="Article[CategoryID]">
			<ali:Record>
				<a href="<%=URL%>" title="<%=Name%>"><%=Name%></a> &gt; 
			</ali:Record>
		</ali:Path>
		正文
	</div>
</div>
<!-- TemplateEndEditable -->

<div class="Wrap">
	<div class="Block8">
		<h3 class="Title"><%=Article[Title]%></h3>
		<hr size="3" class="Hr" />
		<div class="Info">
			<label>时间：</label><%=Article[UpdateTime]%>
			<label>来源：</label><a href="<%=Article[FromLink]%>" target="_blank"><%=Article[FromLabel]%></a>
			<label>浏览：</label><span id="HitCount"></span>
			<label>标签：</label>
			<ali:List Source="Manager.SplitToTable(Article[TagNames], Article[TagPageTemplates], Article[TagPageIDs], Article[TagPageExtensions])">
				<ali:Record>
					<a href="<%=BuildUrl("tag", "PageTemplate=" + [1] + "&ID=" + [2] + "&Ext=" + [3])%>" title="<%=[0]%>"><%=[0]%></a>
				</ali:Record>
			</ali:List>
		</div>
		
		<!-- TemplateBeginEditable name="动作" -->
		<div class="Action">【字体: <a href="" id="Larger">放大</a> <a href="" id="Smaller">缩小</a>】【<a href="" id="Print">打印本页</a>】【<a href="" id="Favorite">收藏本页</a>】【<a href="" id="Close">关闭本页</a>】</div>
		<!-- TemplateEndEditable -->
		
		<div id="Content">
			<!-- TemplateBeginEditable name="副标题" -->
			<%If ArticlePage["Titles"] != null%>
				<div class="SubTitle">
					<ali:List Source="Manager.SplitToTable(ArticlePage['Titles'])">
						<select>
							<ali:Record>
								<%If String.Equals([0], String.Empty)%>
									<%If Index + 1 == PageNumber%>
										<option value="<%=Index%>" selected="selected">第 <%=Index + 1%> 页</option>
									<%Else%>
										<option value="<%=Index%>">第 <%=Index + 1%> 页</option>
									<%EndIf%>
								<%Else%>
									<%If Index + 1 == PageNumber%>
										<option value="<%=Index%>" selected="selected"><%=[0]%></option>
									<%Else%>
										<option value="<%=Index%>"><%=[0]%></option>
									<%EndIf%>
								<%EndIf%>
							</ali:Record>
						</select>
					</ali:List>
				</div>
			<%EndIf%>
			<!-- TemplateEndEditable -->

			<%=ArticlePage["Content"]%>
			
			<div class="Creator"><label>录入：</label><%=Article[Creator]%> <label>编辑：</label><%=Article[Updator]%></div>
		</div>
		
		<!-- TemplateBeginEditable name="分页" -->
		<ali:Pagination Page="PageNumber" PageSize="1" RecordCount="ArticlePage['PageCount']">
			<div class="Pagination">
				<ali:FirstPage>
					<ali:Yes>
						<span class="Disabled">&lt;&lt;</span>
						<span class="Disabled">&lt;</span>
					</ali:Yes>
					<ali:No>
						<a href="<%=FirstPage%>" title="首页">&lt;&lt;</a>
						<a href="<%=PreviousPage%>" title="上一页" id="PrevPage">&lt;</a>
					</ali:No>
				</ali:FirstPage>
				<ali:CurrentPage Range="5">
					<ali:Yes>
						<span class="Selected"><%=Index%></span>						
					</ali:Yes>
					<ali:No>
						<a href="<%=URL%>"><%=Index%></a>
					</ali:No>
				</ali:CurrentPage>
				<ali:LastPage>
					<ali:Yes>
						<span class="Disabled">&gt;</span>
						<span class="Disabled">&gt;&gt;</span>
					</ali:Yes>
					<ali:No>
						<a href="<%=NextPage%>" title="下一页" id="NextPage">&gt;</a>
						<a href="<%=LastPage%>" title="尾页">&gt;&gt;</a>
					</ali:No>
				</ali:LastPage>
			</div>
		</ali:Pagination>
		<!-- TemplateEndEditable -->

		<!-- TemplateBeginEditable name="顶，踩" -->
		<div class="UpDown">
			<a href="" id="Up"><img src="<%=ImagePath%>up.gif" alt="顶" /> 顶 (<span></span>)</a>
			<a href="" id="Down"><img src="<%=ImagePath%>down.gif" alt="踩" /> 踩 (<span></span>)</a>
		</div>
		<!-- TemplateEndEditable -->
		
		<!-- TemplateBeginEditable name="上一篇" -->
		<ali:List Object="Article" Page="1" PageSize="1" Condition="IsDeleted=false and IsChecked=true and InnerID <> Article[InnerID] and UpdateTime < Article[UpdateTime]" Sort="UpdateTime DESC">
			<ali:Record>
				<div class="Nav">上一篇: <a href="<%=BuildUrl()%>" title="<%=Title%>"><%=Title%></a></div>
			</ali:Record>
		</ali:List>
		<!-- TemplateEndEditable -->
		
		<!-- TemplateBeginEditable name="下一篇" -->
		<ali:List Object="Article" Page="1" PageSize="1" Condition="IsDeleted=false and IsChecked=true and InnerID <> Article[InnerID] and UpdateTime > Article[UpdateTime]" Sort="UpdateTime ASC">
			<ali:Record>
				<div class="Nav">下一篇: <a href="<%=BuildUrl()%>" title="<%=Title%>"><%=Title%></a></div>
			</ali:Record>
		</ali:List>
		<!-- TemplateEndEditable -->
		
		<%If Convert.ToBoolean(Config[EnableComment])%>
			<h5 class="CommentTitle">
				<span class="Left">网友评论（<span id="CommentCount">0</span>）</span>
				<span class="Right"><a href="javascript:;" id="WriteComment">我也要写评论</a></span>
			</h5>
			<div class="Block9">
				<!-- TemplateBeginEditable name="评论列表" -->
				<div id="Comment"></div>
				<!-- TemplateEndEditable -->
							
				<!-- TemplateBeginEditable name="广告位：文章 - 评论下方" -->
				<div class="Ad20">
					<ali:Ad Guid="{891EBDF0-FCD0-42bc-A8F0-A7CE627F4141}">
						<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad17.jpg" alt="Ad" style="width:468px;height:60px" /></a>
					</ali:Ad>
				</div>
				<!-- TemplateEndEditable -->
				
				<!-- TemplateBeginEditable name="评论表单" -->
				<form id="CommentForm" action="">
					<textarea name="Content" cols="74" rows="7" class="<%=PageLang%>Font"></textarea><br />
					<%If Manager.HasRight("", InstanceID, PageLang, "ArticleComment", "Add")%>
						<input type="checkbox" name="Anonymous" id="Anonymous" checked="checked" /><label for="Anonymous">匿名</label>
					<%Else%>
						<input type="checkbox" name="Anonymous" id="Anonymous" style="display:none" />
					<%EndIf%>
					用户名：<input type="text" size="20" name="Name" class="<%=PageLang%>Font" />
					<label id="PasswordLabel">密码：<input type="password" size="20" name="Password" class="CHSFont" /></label>
					<%If UserChannel != null%>
						<a href="<%=BuildUrl(UserChannel, "register", null)%>" target="_blank" title="新用户">新用户?</a>
					<%EndIf%>
					<input type="submit" value="提交评论" />
					<input type="hidden" name="ToID" />
				</form>
				<!-- TemplateEndEditable -->
			</div>
		<%EndIf%>
	</div>
	<div class="Block7 MarginLeft">
		<!-- TemplateBeginEditable name="广告位：文章 - 侧栏顶部" -->
		<div class="Block5">
			<ali:Ad Guid="{6A2579D6-A2C5-4a2d-B484-3B06AC5BD27D}">
				<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad3.gif" alt="Ad" style="width:308px;height:60px" /></a>
			</ali:Ad>
		</div>
		<!-- TemplateEndEditable -->
		
		<!-- TemplateBeginEditable name="相关文章" -->
		<div class="Block5">
			<h4>相关文章</h4>
			<ali:List Object="Article" Page="1" PageSize="10" Condition="Condition()" Sort="UpdateTime DESC">
				<ul class="List4">
					<ali:Record>
						<li><a href="<%=BuildUrl()%>" title="<%=Title%>"><%=Title%></a><span><%=HitCount%></span></li>
					</ali:Record>
				</ul>
			</ali:List>
		</div>
		<!-- TemplateEndEditable -->
		
		<!-- TemplateBeginEditable name="人气排行" -->
		<div class="Block5">
			<h4>人气排行</h4>
			<ali:List Object="Article" Page="1" PageSize="10" Condition="IsDeleted=false and IsChecked=true" Sort="HitCount DESC">
				<ul class="List9">
					<ali:Record>
						<li><a href="<%=BuildUrl()%>" title="<%=Title%>" class="No<%=Index + 1%>"><%=Title%></a><span><%=HitCount%></span></li>
					</ali:Record>
				</ul>
			</ali:List>
		</div>
		<!-- TemplateEndEditable -->
		
		<!-- TemplateBeginEditable name="最新更新" -->
		<div class="Block5">
			<h4>最新更新</h4>
			<ali:List Object="Article" Page="1" PageSize="10" Condition="IsDeleted=false and IsChecked=true" Sort="UpdateTime DESC">
				<ul class="List4">
					<ali:Record>
						<li><a href="<%=BuildUrl()%>" title="<%=Title%>"><%=Title%></a><span><%=HitCount%></span></li>
					</ali:Record>
				</ul>
			</ali:List>
		</div>
		<!-- TemplateEndEditable -->

		<!-- TemplateBeginEditable name="广告位：文章 - 侧栏底部" -->
		<div class="Block5">
			<h4></h4>
			<div class="Ad14">
				<ali:Ad Guid="{59C7A345-DC76-4c4f-AA38-3F7C679317AD}">
					<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad14.gif" alt="Ad" style="width:200px;height:200px" /></a>
				</ali:Ad>
			</div>
		</div>
		<!-- TemplateEndEditable -->
	</div>
</div>

<!-- TemplateBeginEditable name="广告位：文章 - 网页底部" -->
<div class="Wrap">
	<div class="Ad9">
		<ali:Ad Guid="{AA0C063F-7DEE-4c50-88B2-36150F7FEBEC}">
			<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad9.jpg" alt="Ad" style="width:980px;height:70px" /></a>
		</ali:Ad>
	</div>
</div>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="友情连接" -->
<ali:List Mark="System" Object="Link" Condition="IsChecked=true">
	<div class="Wrap">
		<div class="Link">
			<h1>友情链接</h1>
			<ul>
				<ali:Record>
					<li>
						<%If Convert.IsDBNull(Logo)%>
							<a href="<%=URL%>" target="_blank" title="<%=Name%>"><%=Name%></a>
						<%Else%>
							<a href="<%=URL%>" target="_blank" title="<%=Name%>"><img src="<%=Logo%>" alt="<%=Name%>" /></a>
						<%EndIf%>
					</li>
				</ali:Record>
			</ul>
		</div>
	</div>
</ali:List>
<!-- TemplateEndEditable -->

<div class="Wrap">
	<div class="Footer">
		<!-- TemplateBeginEditable name="脚注菜单" -->
		<ali:Menu Condition="IsDisplay=true and CategoryID={BAC035A8-F6BB-4772-8D51-A7F4F3AB7AD3}">
			<ali:Record>
				<a href="<%=URL%>" target="<%=Target%>" title="<%=Name%>"<%=Style%>><%=Name%></a>
				<ali:Separator>|</ali:Separator>
			</ali:Record>
			<hr size="1" />
		</ali:Menu>
		<!-- TemplateEndEditable -->
	
		<%=Footer%>
	</div>
</div>

<script type="text/javascript" src="<%=CommonPath%>jquery/core.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/ui.js"></script>
<script type="text/javascript" src="<%=CommonPath%>utility.js"></script>
<%If PageLang == "UYG" || PageLang == "KZA" || PageLang == "KGA"%>
	<script type="text/javascript" src="<%=CommonPath%>IlgharIme.js"></script>
<%EndIf%>
<script type="text/javascript" src="<%=JsPath%>common.js"></script>
<%=StatisticsCode%>
</body>
</html>